package com.spreadk.demo.mapper.impl;

import com.spreadk.demo.entity.User;
import com.spreadk.demo.mapper.UserMapper;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

/**
 * @author:Gan Linghao
 * @date:2020/12/8
 * @time:20:13
 * @description:no description
 */
public class UserMapperImpl implements UserMapper {

    private SqlSessionTemplate sqlSession;

    public void setSqlSessionTemplate (SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSession = sqlSessionTemplate;
    }

    @Override
    public List<User> getUser(String ids) {
        UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
        return userMapper.getUser(ids);
    }

    @Override
    public int updateUser(String name, Long id) {
        return 0;
    }
}
